<%-- 
    Document   : adminUserAdd
    Created on : Nov 9, 2013
    Author     : Reynier Ortiz
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
      <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
        <link rel="shortcut icon" href="../../assets/ico/favicon.png">

        <title>GRS Enter class work</title>

        <!-- Bootstrap core CSS -->
        <link href="../libs/bootstrap/css/bootstrap.css" rel="stylesheet">
        <!-- jQWidgets CSS -->
        <link href="../libs/jqwidgets/styles/jqx.base.css" rel="stylesheet">

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
          <script src="../../assets/js/html5shiv.js"></script>
          <script src="../../assets/js/respond.min.js"></script>
        <![endif]-->
      </head>

    <body>
        <header>
          <nav class="navbar navbar-default" role="navigation">
              <div class="navbar-header"><p class="navbar-text navbar-left">Grade Report System</p></div>
              <form class="navbar-form navbar-right" method="post" action="../login" >
                  <div class="form-group">Signed in as ${sessionScope.UserName}</div>
                  <button id="logout" name="logout" type="submit" class="btn btn-link">(Log out)</button>
              </form>
          </nav>
      </header>
        <div class="container">
            <div id="errorMessageContainer" class="alert alert-danger" style="display: none;">
                <a class="close" data-dismiss="alert" href="#">×</a><span id="errorMessage">${messages.error}</span>
            </div>
            <h2>Add or Edit a Class Work</h2>
            <p class="lead">Enter the information of the class work to add or edit.</p>
            <div class="list-group">
                <h4 class="list-group-item-heading">(${section.getSectionName()}) <span class="text-info"> ${section.getCourse().getCourseCode()} - ${section.getCourse().getCourseName()}</span></h4>
                <p class="list-group-item-text">${section.getProfessor().getFirstName()} ${section.getProfessor().getLastName()}</p>
            </div>
            <form class="form-horizontal" role="form" method="post" action="enterClassWork">
                <input type="hidden" id="sectionId" name="sectionId" value="${sectionId}">
                <input type="hidden" id="inputClassWorkId" name="inputClassWorkId" value="${inputClassWorkId}">
                <input type="hidden" id="inputClassWorkTypeId" name="inputClassWorkTypeId" value="${inputClassWorkTypeId}">
                <input type="hidden" id="classWorkTypes" name="classWorkTypes" value='${classWorkTypes}'>
                <div class="form-group">
                    <label for="inputClassWorkType" class="col-sm-2 control-label">Type</label>
                    <div class="col-sm-4">
                        <select class="form-control" id="inputClassWorkType" name="inputClassWorkType"></select>
                    </div>
                </div>
                <div class="form-group">
                  <label for="inputClassWorkName" class="col-sm-2 control-label">Name</label>
                  <div class="col-sm-4">
                      <input name="inputClassWorkName" type="text" class="form-control" id="inputClassWorkName" placeholder="Class Work Name" value="${inputClassWorkName}">
                  </div>
                </div>
                <div class="form-group">
                    <label for="inputDueDate" class="col-sm-2 control-label">Due Date</label>
                    <div class="col-sm-4">
                        <div id='inputjqxDueDate'></div>
                        <input name="inputDueDate" type="hidden" id="inputDueDate" value="${inputDueDate}">
                    </div>
                </div>
                <div class="form-group">
                  <label for="inputMaxPoints" class="col-sm-2 control-label">Max Points</label>
                  <div class="col-sm-4">
                      <input name="inputMaxPoints" type="number" class="form-control" id="inputMaxPoints" placeholder="Max Points" value="${inputMaxPoints}">
                  </div>
                </div>
                <div class="form-group">
                    <label for="inputWeight" class="col-sm-2 control-label">Weight</label>
                    <div class="col-sm-4">
                        <input name="inputWeight" type="number" class="form-control" id="inputWeight" placeholder="Weight" value="${inputWeight}">
                    </div>
                </div>
                <div class="form-group">
                  <div class="col-sm-offset-2 col-sm-4">
                    <button name="submitClassWork" id="submitClassWork" type="submit" class="btn btn-default btn-primary">Submit</button>
                    <button name="cancelSubmitClassWork" id="cancelSubmitClassWork" type="submit" class="btn btn-default">Cancel</button>
                  </div>
                </div>
          </form>

        </div>
        
    <!-- Bootstrap core JavaScript
    ================================================== -->
    <script src="../libs/jquery/jquery-2.0.3.min.js"></script>
    <script src="../libs/bootstrap/js/bootstrap.min.js"></script>
    <script src="../libs/jqwidgets/jqx-all.js"></script>
    <script src="../scripts/enterClassWork.js"></script>
    <!-- Placed at the end of the document so the pages load faster -->
    </body>
</html>
